import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: WHY
 * Date: 2023-03-21
 * Time: 17:13
 */
public class Test {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String s1=scanner.nextLine();
        String s2=scanner.nextLine();
        HashMap<Character,Integer> hashMap=new HashMap<>();
        //遍历第二个数组
        for(int i=0;i<s2.length();i++){
            if(hashMap.get(s2.charAt(i))==null){
                hashMap.put(s2.charAt(i),1);
            }else{
                hashMap.put(s2.charAt(i),hashMap.get(s2.charAt(i))+1);
            }


    }
        //遍历第一个数组
        String ret="";
        for(int i=0;i<s1.length();i++){
            if(hashMap.get(s1.charAt(i))==null){
                ret+=s1.charAt(i);
            }

        }
        System.out.println(ret);
    }
}
